如何利用python來生產一個QR code
pip install qrcode
pip install pillow
import qrcode
from PIL import image
data = input('Enter the thing you want to generate QR :')
#generate qrcode
qr = qrcode.QRCode(version=2, box_size=15, border=8)
qr.add_data(data)
qr.make(fit=True)
image = qr.make_image(fill='black', back_color='white')
image.save('qrcode.png')
Image.open('qrcode.png')